package com.sunchangpeng.wechat.core.http;

import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;

public class HttpClientFactory {
    public static OkHttpClient createHttpClient() {
        return new OkHttpClient();
    }

    public static OkHttpClient createHttpLogClient() {
        HttpLoggingInterceptor logInterceptor = new HttpLoggingInterceptor(new HttpLogger());
        logInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
        return new OkHttpClient.Builder().addNetworkInterceptor(logInterceptor).build();
    }
}
